#include "widget.h"
#include "ui_widget.h"
#include <QPushButton>
#include <QDebug>
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
   // QPushButton* btn;
   // btn->setText("这是一个被禁用的按钮");
    //btn->setEnabled(false);
    //connect(btn,&QPushButton::clicked,this,&Widget::click);
}

Widget::~Widget()
{
    delete ui;
}

//void click()
//{
//    qDebug() << "按下按钮";
//}


//void Widget::on_pushButton_clicked()
//{
//    bool enable=ui->btn->isEnable();
//}

void Widget::on_pushButton_clicked()
{
    qDebug()<<"这是一";
}

void Widget::on_pushButton_2_clicked()
{
    bool enable = ui->pushButton->isEnabled();
}
